<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="path" value="${pageContext.request.contextPath }" />
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>子弹添加表单</title>
<script type="text/javascript" src="${path}/js/scripts/bootstart.js"></script>
<link rel="stylesheet" type="text/css" href="${path}/css/focus.css" />
</head>
<body>
	<form id="dataForm" method="post">
		<div style="display: none;">
			<input name="dictionaryId" class="mini-textbox" /> <input
				name="dicKey" class="mini-textbox" id="dicKey" />
		</div>
		<div class="form_nav">
			<table width="100%" cellpadding="4" cellspacing="0">
				<tr>
					<td width="15%" class="xx_bt nonebor">字典名称:</td>
					<td width="85%" class="xx_type  nonebor"><input
						class="mini-combobox" required="true" showNullItem="true"
						url="${path}/txt/dictionaryType.txt" nullItemText="请选择字典名称"
						name="dicName" style="width: 90%;" textField="value"
						valueField="value" allowInput="false" onvaluechanged="selectDicName" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">字典值:</td>
					<td class="xx_type"><input name="dicValue" style="width: 90%;"
						class="mini-textbox" required="true" vtype="maxLength:20" /><span
						class="required_cls">*</span></td>
				</tr>
				<tr>
					<td class="xx_bt">备注:</td>
					<td class="xx_type"><input name="display"
						class="mini-textarea" style="width: 90%;" vtype="maxLength:255" /></td>
				</tr>
			</table>
		</div>
		<div style="text-align: center; padding: 10px;">
			<a class="mini-button" onclick="dataform.saveData" id="sub_button"
				iconCls="icon-save" style="width: 60px; margin-right: 20px;">保存</a>
			<a iconCls="icon-cancel" class="mini-button"
				onclick="$.form.onCancel()" style="width: 60px;">取消</a>
		</div>
	</form>
	<script type="text/javascript" src="${path}/js/scripts/dataform.js"></script>
	<script type="text/javascript">
		mini.parse();
		$(function() {
			$.form.init(); //初始化表单
			window.dataform = {};
			dataform.saveData = function() {
				var form = new mini.Form("#dataForm");
				form.validate();
				if (form.isValid() == false) {
					return;
				}
				mini.get("sub_button").disable();
				$.form.saveData({
					url : "${path}/mgr/dictionary/addObj",
					id : "dataForm",
					showMsg : true
				//是否显示提示信息
				});
			};
		});
		function selectDicName(e) {
			mini.get("dicKey").setValue(e.selected.key);
		}
	</script>
</body>
</html>